package threadcoreknowledge.sixstates.scy;

public class ThreadState {
    public static void main(String[] args) throws Exception {

        Thread thread1 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("-------");
                try {
                    while (true) {

                    }
//                    Thread.sleep(1000 *10 );
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }, "线程1");

        System.out.println(thread1.getState());

        thread1.start();
        Thread.sleep(5);

        System.out.println(thread1.getState());


    }
}
